Optimal. Leaf size=270 \[ -\frac {2 a b d e x}{c}+\frac {b^2 e^2 x}{3 c^2}-\frac {b^2 e^2 \text {ArcTan}(c x)}{3 c^3}-\frac {2 b^2 d e x \text {ArcTan}(c x)}{c}-\frac {b e^2 x^2 (a+b \text {ArcTan}(c x))}{3 c}+\frac {i \left (3 c^2 d^2-e^2\right ) (a+b \text {ArcTan}(c x))^2}{3 c^3}-\frac {d \left (d^2-\frac {3 e^2}{c^2}\right ) (a+b \text {ArcTan}(c x))^2}{3 e}+\frac {(d+e x)^3 (a+b \text {ArcTan}(c x))^2}{3 e}+\frac {2 b \left (3 c^2 d^2-e^2\right ) (a+b \text {ArcTan}(c x)) \log \left (\frac {2}{1+i c x}\right )}{3 c^3}+\frac {b^2 d e \log \left (1+c^2 x^2\right )}{c^2}+\frac {i b^2 \left (3 c^2 d^2-e^2\right ) \text {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{3 c^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.26, antiderivative size = 270, normalized size of antiderivative = 1.00, number of steps
used = 15, number of rules used = 12, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.667, Rules used = {4974, 4930,
266, 4946, 327, 209, 5104, 5004, 5040, 4964, 2449, 2352} \begin {gather*} -\frac {d \left (d^2-\frac {3 e^2}{c^2}\right ) (a+b \text {ArcTan}(c x))^2}{3 e}+\frac {i \left (3 c^2 d^2-e^2\right ) (a+b \text {ArcTan}(c x))^2}{3 c^3}+\frac {2 b \left (3 c^2 d^2-e^2\right ) \log \left (\frac {2}{1+i c x}\right ) (a+b \text {ArcTan}(c x))}{3 c^3}+\frac {(d+e x)^3 (a+b \text {ArcTan}(c x))^2}{3 e}-\frac {b e^2 x^2 (a+b \text {ArcTan}(c x))}{3 c}-\frac {2 a b d e x}{c}-\frac {b^2 e^2 \text {ArcTan}(c x)}{3 c^3}-\frac {2 b^2 d e x \text {ArcTan}(c x)}{c}+\frac {b^2 d e \log \left (c^2 x^2+1\right )}{c^2}+\frac {b^2 e^2 x}{3 c^2}+\frac {i b^2 \left (3 c^2 d^2-e^2\right ) \text {Li}_2\left (1-\frac {2}{i c x+1}\right )}{3 c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 266
Rule 327
Rule 2352
Rule 2449
Rule 4930
Rule 4946
Rule 4964
Rule 4974
Rule 5004
Rule 5040
Rule 5104
Rubi steps
\begin {align*} \int (d+e x)^2 \left (a+b \tan ^{-1}(c x)\right )^2 \, dx &=\frac {(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 e}-\frac {(2 b c) \int \left (\frac {3 d e^2 \left (a+b \tan ^{-1}(c x)\right )}{c^2}+\frac {e^3 x \left (a+b \tan ^{-1}(c x)\right )}{c^2}+\frac {\left (c^2 d^3-3 d e^2+e \left (3 c^2 d^2-e^2\right ) x\right ) \left (a+b \tan ^{-1}(c x)\right )}{c^2 \left (1+c^2 x^2\right )}\right ) \, dx}{3 e}\\ &=\frac {(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 e}-\frac {(2 b) \int \frac {\left (c^2 d^3-3 d e^2+e \left (3 c^2 d^2-e^2\right ) x\right ) \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx}{3 c e}-\frac {(2 b d e) \int \left (a+b \tan ^{-1}(c x)\right ) \, dx}{c}-\frac {\left (2 b e^2\right ) \int x \left (a+b \tan ^{-1}(c x)\right ) \, dx}{3 c}\\ &=-\frac {2 a b d e x}{c}-\frac {b e^2 x^2 \left (a+b \tan ^{-1}(c x)\right )}{3 c}+\frac {(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 e}-\frac {(2 b) \int \left (\frac {c^2 d^3 \left (1-\frac {3 e^2}{c^2 d^2}\right ) \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2}-\frac {e \left (-3 c^2 d^2+e^2\right ) x \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2}\right ) \, dx}{3 c e}-\frac {\left (2 b^2 d e\right ) \int \tan ^{-1}(c x) \, dx}{c}+\frac {1}{3} \left (b^2 e^2\right ) \int \frac {x^2}{1+c^2 x^2} \, dx\\ &=-\frac {2 a b d e x}{c}+\frac {b^2 e^2 x}{3 c^2}-\frac {2 b^2 d e x \tan ^{-1}(c x)}{c}-\frac {b e^2 x^2 \left (a+b \tan ^{-1}(c x)\right )}{3 c}+\frac {(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 e}+\left (2 b^2 d e\right ) \int \frac {x}{1+c^2 x^2} \, dx-\frac {\left (b^2 e^2\right ) \int \frac {1}{1+c^2 x^2} \, dx}{3 c^2}-\frac {1}{3} \left (2 b d \left (\frac {c d^2}{e}-\frac {3 e}{c}\right )\right ) \int \frac {a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx-\frac {\left (2 b \left (3 c^2 d^2-e^2\right )\right ) \int \frac {x \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx}{3 c}\\ &=-\frac {2 a b d e x}{c}+\frac {b^2 e^2 x}{3 c^2}-\frac {b^2 e^2 \tan ^{-1}(c x)}{3 c^3}-\frac {2 b^2 d e x \tan ^{-1}(c x)}{c}-\frac {b e^2 x^2 \left (a+b \tan ^{-1}(c x)\right )}{3 c}+\frac {i \left (3 c^2 d^2-e^2\right ) \left (a+b \tan ^{-1}(c x)\right )^2}{3 c^3}-\frac {d \left (d^2-\frac {3 e^2}{c^2}\right ) \left (a+b \tan ^{-1}(c x)\right )^2}{3 e}+\frac {(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 e}+\frac {b^2 d e \log \left (1+c^2 x^2\right )}{c^2}+\frac {\left (2 b \left (3 c^2 d^2-e^2\right )\right ) \int \frac {a+b \tan ^{-1}(c x)}{i-c x} \, dx}{3 c^2}\\ &=-\frac {2 a b d e x}{c}+\frac {b^2 e^2 x}{3 c^2}-\frac {b^2 e^2 \tan ^{-1}(c x)}{3 c^3}-\frac {2 b^2 d e x \tan ^{-1}(c x)}{c}-\frac {b e^2 x^2 \left (a+b \tan ^{-1}(c x)\right )}{3 c}+\frac {i \left (3 c^2 d^2-e^2\right ) \left (a+b \tan ^{-1}(c x)\right )^2}{3 c^3}-\frac {d \left (d^2-\frac {3 e^2}{c^2}\right ) \left (a+b \tan ^{-1}(c x)\right )^2}{3 e}+\frac {(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 e}+\frac {2 b \left (3 c^2 d^2-e^2\right ) \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{3 c^3}+\frac {b^2 d e \log \left (1+c^2 x^2\right )}{c^2}-\frac {\left (2 b^2 \left (3 c^2 d^2-e^2\right )\right ) \int \frac {\log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{3 c^2}\\ &=-\frac {2 a b d e x}{c}+\frac {b^2 e^2 x}{3 c^2}-\frac {b^2 e^2 \tan ^{-1}(c x)}{3 c^3}-\frac {2 b^2 d e x \tan ^{-1}(c x)}{c}-\frac {b e^2 x^2 \left (a+b \tan ^{-1}(c x)\right )}{3 c}+\frac {i \left (3 c^2 d^2-e^2\right ) \left (a+b \tan ^{-1}(c x)\right )^2}{3 c^3}-\frac {d \left (d^2-\frac {3 e^2}{c^2}\right ) \left (a+b \tan ^{-1}(c x)\right )^2}{3 e}+\frac {(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 e}+\frac {2 b \left (3 c^2 d^2-e^2\right ) \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{3 c^3}+\frac {b^2 d e \log \left (1+c^2 x^2\right )}{c^2}+\frac {\left (2 i b^2 \left (3 c^2 d^2-e^2\right )\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+i c x}\right )}{3 c^3}\\ &=-\frac {2 a b d e x}{c}+\frac {b^2 e^2 x}{3 c^2}-\frac {b^2 e^2 \tan ^{-1}(c x)}{3 c^3}-\frac {2 b^2 d e x \tan ^{-1}(c x)}{c}-\frac {b e^2 x^2 \left (a+b \tan ^{-1}(c x)\right )}{3 c}+\frac {i \left (3 c^2 d^2-e^2\right ) \left (a+b \tan ^{-1}(c x)\right )^2}{3 c^3}-\frac {d \left (d^2-\frac {3 e^2}{c^2}\right ) \left (a+b \tan ^{-1}(c x)\right )^2}{3 e}+\frac {(d+e x)^3 \left (a+b \tan ^{-1}(c x)\right )^2}{3 e}+\frac {2 b \left (3 c^2 d^2-e^2\right ) \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{3 c^3}+\frac {b^2 d e \log \left (1+c^2 x^2\right )}{c^2}+\frac {i b^2 \left (3 c^2 d^2-e^2\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{3 c^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.35, size = 312, normalized size = 1.16 \begin {gather*} \frac {3 a^2 c^3 d^2 x-6 a b c^2 d e x+b^2 c e^2 x+3 a^2 c^3 d e x^2-a b c^2 e^2 x^2+a^2 c^3 e^2 x^3+b^2 \left (-3 i c^2 d^2+3 c d e+i e^2+c^3 x \left (3 d^2+3 d e x+e^2 x^2\right )\right ) \text {ArcTan}(c x)^2+b \text {ArcTan}(c x) \left (6 a c d e-b e \left (e+6 c^2 d x+c^2 e x^2\right )+2 a c^3 x \left (3 d^2+3 d e x+e^2 x^2\right )+2 b \left (3 c^2 d^2-e^2\right ) \log \left (1+e^{2 i \text {ArcTan}(c x)}\right )\right )-3 a b c^2 d^2 \log \left (1+c^2 x^2\right )+3 b^2 c d e \log \left (1+c^2 x^2\right )+a b e^2 \log \left (1+c^2 x^2\right )-i b^2 \left (3 c^2 d^2-e^2\right ) \text {PolyLog}\left (2,-e^{2 i \text {ArcTan}(c x)}\right )}{3 c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 699 vs. \(2 (250 ) = 500\).
time = 0.23, size = 700, normalized size = 2.59 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \operatorname {atan}{\left (c x \right )}\right )^{2} \left (d + e x\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2\,{\left (d+e\,x\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________